package com.fingard.dsp.bank.reqrespobj.elecbillquery;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.elecbillquery.detail.RetAtsB006BillStateQryDetail;
import com.fingard.xml.XmlTextWriter;

public class RetAtsB006BillStateQry extends RetAtsBase {
    public RetAtsB006BillStateQry(ReqRespHeader p_header) {
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }

    public void writeBeforeDetail() {
        writeStart();
    }

    public void writeAfter() {
        writeEnd();
    }

    private boolean writtenBefore = false;

    public void writeDetail(RetAtsB006BillStateQryDetail DB004Resp) {
//        if (writtenBefore == false) {
        retXmlWriter.writeStartElement("DetailRecord");
//            writtenBefore = true;
//        }
        retXmlWriter.writeElementString("RespCode", DB004Resp.respCode);
        retXmlWriter.writeElementString("RespInfo", DB004Resp.respInfo);
        retXmlWriter.writeElementString("BillNo", DB004Resp.billNo);
        retXmlWriter.writeElementString("ReqSeqID", DB004Resp.reqSeqID);
        retXmlWriter.writeElementString("TransState", DB004Resp.transState);
        retXmlWriter.writeElementString("PayInfoCode", DB004Resp.payInfoCode);
        retXmlWriter.writeElementString("BillState", DB004Resp.billState);
        retXmlWriter.writeElementString("BusiNo", DB004Resp.busiNo);
        retXmlWriter.writeEndElement();
    }
}
